home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / eulisp / you-075a.lha / you-075a / lex.yy.c < prev    next >
C/C++ Source or Header  |  1992-11-02  |  45KB  |  1,706 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* scanner skeleton version:
  4.  * $Header: /denton_export/denton/You/NewYou/Src/RCS/lex.yy.c,v 1.5 1992/06/16 19:33:37 pab Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  13. #ifdef c_plusplus
  14. #ifndef __cplusplus
  15. #define __cplusplus
  16. #endif
  17. #endif
  18.  
  19.  
  20. #ifdef __cplusplus
  21.  
  22. #include <stdlib.h>
  23. #include <osfcn.h>
  24.  
  25. /* use prototypes in function declarations */
  26. #define YY_USE_PROTOS
  27.  
  28. /* the "const" storage-class-modifier is valid */
  29. #define YY_USE_CONST
  30.  
  31. #else    /* ! __cplusplus */
  32.  
  33. #ifdef __STDC__
  34.  
  35. #ifdef __GNUC__
  36. #include <stddef.h>
  37. void *malloc( size_t );
  38. void free( void* );
  39. #else
  40. #include <stdlib.h>
  41. #endif    /* __GNUC__ */
  42.  
  43. #define YY_USE_PROTOS
  44. #define YY_USE_CONST
  45.  
  46. #endif    /* __STDC__ */
  47. #endif    /* ! __cplusplus */
  48.  
  49.  
  50. #ifdef __TURBOC__
  51. #define YY_USE_CONST
  52. #endif
  53.  
  54.  
  55. #ifndef YY_USE_CONST
  56. #define const
  57. #endif
  58.  
  59.  
  60. #ifdef YY_USE_PROTOS
  61. #define YY_PROTO(proto) proto
  62. #else
  63. #define YY_PROTO(proto) ()
  64. /* we can't get here if it's an ANSI C compiler, or a C++ compiler,
  65.  * so it's got to be a K&R compiler, and therefore there's no standard
  66.  * place from which to include these definitions
  67.  */
  68. char *malloc();
  69. int free();
  70. int read();
  71. #endif
  72.  
  73.  
  74. /* amount of stuff to slurp up with each read */
  75. #ifndef YY_READ_BUF_SIZE
  76. #define YY_READ_BUF_SIZE 8192
  77. #endif
  78.  
  79. /* returned upon end-of-file */
  80. #define YY_END_TOK 0
  81.  
  82. /* copy whatever the last rule matched to the standard output */
  83.  
  84. /* cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */
  85. /* this used to be an fputs(), but since the string might contain NUL's,
  86.  * we now use fwrite()
  87.  */
  88. #ifdef titan
  89. #define ECHO (void) fwrite( (char *) yytext, (unsigned) yyleng, 1, yyout )
  90. #else
  91. #define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout )
  92. #endif
  93.  
  94. /* gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  95.  * is returned in "result".
  96.  */
  97. #define YY_INPUT(buf,result,max_size) \
  98.     if ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  99.         YY_FATAL_ERROR( "read() in flex scanner failed" );
  100. #define YY_NULL 0
  101.  
  102. /* no semi-colon after return; correct usage is to write "yyterminate();" -
  103.  * we don't want an extra ';' after the "return" because that will cause
  104.  * some compilers to complain about unreachable statements.
  105.  */
  106. #define yyterminate() return ( YY_NULL )
  107.  
  108. /* report a fatal error */
  109.  
  110. /* The funky do-while is used to turn this macro definition into
  111.  * a single C statement (which needs a semi-colon terminator).
  112.  * This avoids problems with code like:
  113.  *
  114.  *     if ( something_happens )
  115.  *        YY_FATAL_ERROR( "oops, the something happened" );
  116.  *    else
  117.  *        everything_okay();
  118.  *
  119.  * Prior to using the do-while the compiler would get upset at the
  120.  * "else" because it interpreted the "if" statement as being all
  121.  * done when it reached the ';' after the YY_FATAL_ERROR() call.
  122.  */
  123.  
  124. #define YY_FATAL_ERROR(msg) \
  125.     do \
  126.         { \
  127.         (void) fputs( msg, stderr ); \
  128.         (void) putc( '\n', stderr ); \
  129.         exit( 1 ); \
  130.         } \
  131.     while ( 0 )
  132.  
  133. /* default yywrap function - always treat EOF as an EOF */
  134. #define yywrap() 1
  135.  
  136. /* enter a start condition.  This macro really ought to take a parameter,
  137.  * but we do it the disgusting crufty way forced on us by the ()-less
  138.  * definition of BEGIN
  139.  */
  140. #define BEGIN yy_start = 1 + 2 *
  141.  
  142. /* action number for EOF rule of a given start state */
  143. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  144.  
  145. /* special action meaning "start processing a new file" */
  146. #define YY_NEW_FILE \
  147.     do \
  148.         { \
  149.         yy_init_buffer( yy_current_buffer, yyin ); \
  150.         yy_load_buffer_state(); \
  151.         } \
  152.     while ( 0 )
  153.  
  154. /* default declaration of generated scanner - a define so the user can
  155.  * easily add parameters
  156.  */
  157. #define YY_DECL int yylex ( stacktop) void* stacktop;
  158.  
  159. /* code executed at the end of each rule */
  160. #define YY_BREAK break;
  161.  
  162. #define YY_END_OF_BUFFER_CHAR 0
  163.  
  164. #ifndef YY_BUF_SIZE
  165. #define YY_BUF_SIZE (YY_READ_BUF_SIZE * 2) /* size of default input buffer */
  166. #endif
  167.  
  168. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  169.  
  170. #define YY_CHAR char
  171. # line 1 "parser.lex"
  172. #define INITIAL 0
  173. /* -*- C -*- */
  174. /* EuLisp lexer
  175.  *
  176.  * Russell Bradford, Bath 1990
  177.  * Based on work by J. Bejar, A. Moreno, E. Sesa (FIB,UPC) - Bath, July 1990
  178.  *
  179.  */
  180. /* $Id: lex.yy.c,v 1.5 1992/06/16 19:33:37 pab Exp $ */
  181. /* $Log:
  182. */
  183. # line 14 "parser.lex"
  184.  
  185. /* Hack the lex reader */
  186.  
  187. #ifdef YY_INPUT
  188. #undef YY_INPUT
  189. #endif
  190.  
  191. #ifndef GNUREADLINE
  192.  
  193. #define YY_INPUT(buf,result,max_size) \
  194.   if ( (result = system_read( fileno(yyin), (char *) buf, max_size )) < 0 ) \
  195.     YY_FATAL_ERROR( "read() in flex scanner failed" );
  196.  
  197. #else /* GNUREADLINE */
  198.  
  199. #define YY_INPUT(buf,result,max_size) \
  200.   { \
  201.     if ( fileno(yyin) == 0) { /* stdin only */ \
  202.       extern char current_prompt_string[]; \
  203.       extern char *readline(char *); \
  204.       char *tmp; \
  205.       \
  206.       retry: \
  207.       \
  208.       tmp = readline(current_prompt_string); \
  209.       \
  210.       if (tmp == NULL) { \
  211.         result = 0; \
  212.       } \
  213.       else if (*tmp != '\0') { \
  214.         add_history(tmp); \
  215.         strcpy(buf,tmp); \
  216.         free(tmp); \
  217.         result = strlen(buf)+1; \
  218.         buf[result-1] = '\n'; \
  219.       } \
  220.       else { \
  221.         goto retry; \
  222.       } \
  223.     \
  224.     } \
  225.     else { \
  226.     \
  227.       if ((result = system_read(fileno(yyin),(char *) buf, max_size )) < 0 ) \
  228.         YY_FATAL_ERROR( "read() in flex scanner failed" ); \
  229.     \
  230.     } \
  231.   }
  232.  
  233. #endif /* GNUREADLINE */
  234.  
  235. /* Emergency fileno */
  236.  
  237. #ifndef fileno
  238. #define fileno(fh) (fh == stdin ? 0 \
  239.             : (fh == stdout ? 1 \
  240.                        : (fh == stderr ? 2 : 3)))
  241. #endif /* fileno */
  242.  
  243. #include <string.h>
  244. #include <ctype.h>
  245. #include "funcalls.h"
  246. #include "defs.h"
  247. #include "structs.h"
  248. #include "global.h"
  249. #include "symboot.h"
  250. #include "lex_global.h"
  251. #include "error.h"
  252.  
  253. #ifdef msdos
  254. #include "y-tab.h"
  255. #else
  256. #include "y.tab.h"
  257. #endif
  258.  
  259. #ifdef __STDC__
  260. #define OF(ansi, kr, krargs) ansi
  261. #define PROTO(args) args
  262. #else
  263. #define OF(ansi, kr, krargs) kr krargs
  264. #define PROTO(args) ()
  265. #endif
  266.  
  267. #ifdef __STDC__
  268.  
  269. /*
  270. #ifndef DONT_HAVE_STDLIB_H
  271. #include <stdlib.h>
  272. #else
  273. void *malloc( unsigned );
  274. void free( void* );
  275. #endif
  276.  
  277. extern int read(int, char *, unsigned);
  278. */
  279.  
  280. #else
  281. extern double atof();
  282. #endif
  283.  
  284. /* the values returned */
  285. double flex_floatval;
  286. long flex_ratnumval, flex_ratdenval;
  287. long flex_intval;
  288. char flex_charval;
  289. char flex_stringval[1024];    /* I don't like fixed array sizes */
  290. char flex_idval[256];
  291. pptoken pptok;            /* for backward compatibility */
  292. int lex_input_line_number=1;    /* Needs changing for shared memory */
  293.  
  294. static double convert_float PROTO((void));
  295. static long convert_integer PROTO((char *, int));
  296. static long int_with_base PROTO((char *, int *));
  297. static void convert_rational PROTO((void));
  298. static void convert_string PROTO((void));
  299. static char convert_character PROTO((void));
  300. static void tidy_id PROTO((void));
  301. int escaped_id PROTO((char*));
  302. char *visible PROTO((char));
  303.  
  304. /* forward references */
  305. /* tokens */
  306. /*delimeter    {whitespace}|{pair-begin}|{pair-end}|{string-begin}|{string-end}|{comment-begin}*/
  307. /* character syntax */
  308. /* number syntax */
  309. /* integers */
  310. /* rationals */
  311. /* floats */
  312. /* strings */
  313. /* we do these by hand, as it's easier that way */
  314. /* identifiers */
  315. # line 230 "parser.lex"
  316.  
  317. /* done after the current pattern has been matched and before the
  318.  * corresponding action - sets up yytext
  319.  */
  320. #define YY_DO_BEFORE_ACTION \
  321.     yytext = yy_bp; \
  322.     yyleng = yy_cp - yy_bp; \
  323.     yy_hold_char = *yy_cp; \
  324.     *yy_cp = '\0'; \
  325.     yy_c_buf_p = yy_cp;
  326.  
  327. #define EOB_ACT_CONTINUE_SCAN 0
  328. #define EOB_ACT_END_OF_FILE 1
  329. #define EOB_ACT_LAST_MATCH 2
  330.  
  331. /* return all but the first 'n' matched characters back to the input stream */
  332. #define yyless(n) \
  333.     do \
  334.         { \
  335.         /* undo effects of setting up yytext */ \
  336.         *yy_cp = yy_hold_char; \
  337.         yy_c_buf_p = yy_cp = yy_bp + n; \
  338.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  339.         } \
  340.     while ( 0 )
  341.  
  342. #define unput(c) yyunput( c, yytext )
  343.  
  344.  
  345. struct yy_buffer_state
  346.     {
  347.     FILE *yy_input_file;
  348.  
  349.     YY_CHAR *yy_ch_buf;        /* input buffer */
  350.     YY_CHAR *yy_buf_pos;    /* current position in input buffer */
  351.  
  352.     /* size of input buffer in bytes, not including room for EOB characters*/
  353.     int yy_buf_size;    
  354.  
  355.     /* number of characters read into yy_ch_buf, not including EOB characters */
  356.     int yy_n_chars;
  357.  
  358.     int yy_eof_status;        /* whether we've seen an EOF on this buffer */
  359. #define EOF_NOT_SEEN 0
  360.     /* "pending" happens when the EOF has been seen but there's still
  361.      * some text process
  362.      */
  363. #define EOF_PENDING 1
  364. #define EOF_DONE 2
  365.     };
  366.  
  367. static YY_BUFFER_STATE yy_current_buffer;
  368.  
  369. /* we provide macros for accessing buffer states in case in the
  370.  * future we want to put the buffer states in a more general
  371.  * "scanner state"
  372.  */
  373. #define YY_CURRENT_BUFFER yy_current_buffer
  374.  
  375.  
  376. /* yy_hold_char holds the character lost when yytext is formed */
  377. static YY_CHAR yy_hold_char;
  378.  
  379. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  380.  
  381.  
  382.  
  383. #ifndef YY_USER_ACTION
  384. #define YY_USER_ACTION
  385. #endif
  386.  
  387. #ifndef YY_USER_INIT
  388. #define YY_USER_INIT
  389. #endif
  390.  
  391. extern YY_CHAR *yytext;
  392. extern int yyleng;
  393. extern FILE *yyin, *yyout;
  394.  
  395. YY_CHAR *yytext;
  396. int yyleng;
  397.  
  398. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  399.  
  400. #define YY_END_OF_BUFFER 24
  401. typedef int yy_state_type;
  402. static const short int yy_accept[162] =
  403.     {   0,
  404.         0,    0,   24,   22,    3,    3,   21,   19,   11,    7,
  405.         5,    6,   21,    9,    4,   16,   22,   22,    8,   22,
  406.        21,    0,    0,    0,    0,    0,    0,    0,   21,    0,
  407.        21,   16,    0,    0,   10,   21,   12,    0,    0,   12,
  408.         0,    0,    0,    2,   21,    0,    0,   21,    0,    0,
  409.         0,   14,   15,   17,   20,   20,   20,   20,   20,   20,
  410.        20,   20,   20,   20,   20,   20,   21,    0,    0,   12,
  411.        21,    0,    0,   21,    0,    0,    0,   21,    0,    0,
  412.        12,    0,    0,   13,    0,   12,   18,   20,    0,    0,
  413.         0,    0,    0,    0,    0,    0,    0,    0,   21,    0,
  414.  
  415.         0,   21,   21,    0,    0,    0,   12,    0,   12,    0,
  416.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  417.         0,   20,    0,   21,   12,    0,   13,   13,   13,    0,
  418.         0,    0,    0,    0,    0,    0,    0,    0,   13,    0,
  419.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  420.         0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
  421.         0
  422.     } ;
  423.  
  424. static const YY_CHAR yy_ec[128] =
  425.     {   0,
  426.         1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
  427.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  428.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  429.         1,    4,    5,    6,    7,    5,    5,    5,    8,    9,
  430.        10,    5,   11,   12,   13,   14,   15,   16,   16,   17,
  431.        17,   17,   17,   17,   17,   18,   18,    5,   19,    5,
  432.         5,    5,    5,   20,   21,   22,   21,   23,   23,   21,
  433.        24,   24,   24,   24,   24,   24,   24,   24,   25,   24,
  434.        24,   26,   24,   24,   24,   24,   24,   27,   24,   24,
  435.         5,   28,    5,   29,    5,   30,   31,   32,   33,   34,
  436.  
  437.        35,   36,   24,   24,   37,   24,   38,   39,   40,   41,
  438.        42,   43,   24,   44,   45,   46,   47,   48,   49,   27,
  439.        24,   24,    5,   50,    5,    5,    1
  440.     } ;
  441.  
  442. static const YY_CHAR yy_meta[51] =
  443.     {   0,
  444.         1,    1,    1,    1,    2,    1,    3,    1,    1,    1,
  445.         2,    1,    2,    2,    2,    4,    4,    4,    1,    2,
  446.         4,    4,    4,    5,    5,    5,    5,    2,    2,    1,
  447.         4,    4,    4,    4,    4,    4,    5,    5,    5,    5,
  448.         5,    5,    5,    5,    5,    5,    5,    5,    5,    2
  449.     } ;
  450.  
  451. static const short int yy_base[186] =
  452.     {   0,
  453.         0,    0,  421,  422,  422,  422,   23,  422,   58,  422,
  454.       422,  422,   49,  400,   41,   87,  416,    0,  422,   32,
  455.        34,    0,   42,   71,  402,   36,    0,   94,   43,  389,
  456.        91,    0,    0,   44,  422,   67,  127,    0,   68,  130,
  457.       142,  155,  413,  422,   70,   84,    0,   86,  101,    0,
  458.         0,   39,  139,  400,  422,    0,  375,  382,  377,  369,
  459.       373,  374,  373,  364,  375,  329,  124,    0,  129,  164,
  460.       135,  139,    0,  141,    0,  147,  177,  150,  155,    0,
  461.       185,  193,  205,  199,  208,  217,  335,  422,  281,  275,
  462.       266,  260,  261,  252,  254,  268,  266,  253,  168,  179,
  463.  
  464.         0,  225,  200,  211,    0,  228,  238,  241,  246,  250,
  465.       280,   62,    0,  251,  255,  257,  251,  255,  250,  241,
  466.       254,  422,  240,  253,  256,    0,  269,  115,    0,  237,
  467.       237,  234,  243,  242,  240,  221,  225,  215,    0,  208,
  468.       214,  213,  205,  190,  172,  179,  155,  149,  142,  141,
  469.       139,  104,   93,   90,   77,   78,   98,   60,   50,   36,
  470.       422,  305,  309,  313,  318,  323,  328,  333,  338,   60,
  471.       343,  347,  352,  357,  361,  366,  371,  373,  378,  383,
  472.       388,  393,  398,   57,  400
  473.     } ;
  474.  
  475. static const short int yy_def[186] =
  476.     {   0,
  477.       161,    1,  161,  161,  161,  161,  162,  161,  161,  161,
  478.       161,  161,  163,  161,  164,  161,  165,  166,  161,  167,
  479.       162,  168,  169,  161,  161,  161,  170,  171,  172,    9,
  480.       172,   16,  173,  174,  161,  175,  161,  176,  177,  161,
  481.       161,  161,  165,  161,  162,  167,  167,  162,  169,  169,
  482.       178,  161,  161,  170,  161,  179,  161,  161,  161,  161,
  483.       161,  161,  161,  161,  161,  161,  172,  180,  181,  172,
  484.       172,  174,  174,  175,  182,  183,  161,  175,  177,  177,
  485.       161,  161,  161,  161,  161,  161,  178,  161,  161,  161,
  486.       161,  161,  161,  161,  161,  161,  161,  161,  172,  181,
  487.  
  488.       181,  172,  175,  183,  183,  161,  161,  161,  161,  161,
  489.       161,  161,  184,  161,  161,  161,  161,  161,  161,  161,
  490.       161,  161,  161,  172,  172,  185,  161,  161,  184,  161,
  491.       161,  161,  161,  161,  161,  161,  161,  161,  185,  161,
  492.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  493.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  494.         0,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  495.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  496.       161,  161,  161,  161,  161
  497.     } ;
  498.  
  499. static const short int yy_nxt[473] =
  500.     {   0,
  501.         4,    5,    6,    5,    7,    8,    9,   10,   11,   12,
  502.        13,   14,   13,   15,    7,   16,   16,   16,   17,    7,
  503.         7,    7,    7,    7,    7,    7,    7,   18,    7,   19,
  504.         7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
  505.         7,    7,    7,    7,    7,    7,    7,    7,    7,   20,
  506.        22,   53,   53,   41,   52,   30,   37,   37,   37,   47,
  507.       129,   22,   31,   54,   32,   32,   32,  122,   38,   50,
  508.        68,   73,   23,   24,   24,   24,   33,  128,  128,   25,
  509.       160,   45,   26,   23,   27,   28,   24,   24,   24,   25,
  510.        39,   48,   69,   71,   75,   80,   51,   22,   34,   26,
  511.  
  512.        40,   41,   32,   32,   32,  159,   70,   70,   70,   42,
  513.       158,   47,  122,   22,   51,  157,   76,   78,   68,   23,
  514.        42,   42,   56,  122,   57,   58,  122,   59,   50,   60,
  515.       128,  128,   61,   45,   62,   23,  156,   63,   64,   65,
  516.        69,   66,   37,   37,   37,   81,   81,   81,   83,   77,
  517.        48,   68,   82,   41,   53,   53,  101,   84,   84,   84,
  518.        77,   77,   68,   82,   82,   85,   73,   85,   75,  155,
  519.        86,   86,   86,   69,  105,  122,  154,   75,   99,   70,
  520.        70,   70,   80,  153,   69,  152,  102,  106,   71,  106,
  521.        76,   68,  107,  107,  107,   68,  103,  102,  102,   76,
  522.  
  523.        81,   81,   81,  108,   78,  108,  101,   82,  109,  109,
  524.       109,  151,  122,   69,   84,   84,   84,   69,   82,   82,
  525.       110,  110,  110,   86,   86,   86,  111,   75,   99,  112,
  526.       150,  113,   86,   86,   86,  124,  111,  124,  105,  149,
  527.       125,  125,  125,  107,  107,  107,  112,  148,  122,   76,
  528.       147,  146,   68,  107,  107,  107,  109,  109,  109,  122,
  529.       103,  109,  109,  109,  145,  110,  110,  110,  125,  125,
  530.       125,  125,  125,  125,   69,  126,  144,  143,  142,  141,
  531.        68,  140,  122,   68,  127,  138,  137,  136,  135,  134,
  532.       133,  132,  131,  126,  130,  127,  123,  122,  121,  120,
  533.  
  534.       119,  118,   69,  117,  116,   69,   21,  115,   21,   21,
  535.        29,   29,   29,   29,   36,  114,   36,   36,   43,   43,
  536.        43,   43,   43,   45,   45,   45,   45,   45,   46,   46,
  537.        46,   46,   46,   48,   48,   48,   48,   48,   49,   49,
  538.        49,   49,   49,   55,   55,   55,   55,   55,   67,   41,
  539.        67,   67,   71,   71,   71,   71,   71,   72,   72,   72,
  540.        72,   72,   74,   98,   74,   74,   78,   78,   78,   78,
  541.        78,   79,   79,   79,   79,   79,   87,   87,   88,   88,
  542.        88,   88,   88,   99,   99,   99,   99,   99,  100,  100,
  543.       100,  100,  100,  103,  103,  103,  103,  103,  104,  104,
  544.  
  545.       104,  104,  104,  139,  139,   97,   96,   95,   94,   93,
  546.        92,   91,   90,   89,   41,   44,  161,   52,   44,   35,
  547.       161,    3,  161,  161,  161,  161,  161,  161,  161,  161,
  548.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  549.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  550.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  551.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  552.       161,  161
  553.     } ;
  554.  
  555. static const short int yy_chk[473] =
  556.     {   0,
  557.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  558.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  559.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  560.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  561.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  562.         7,   26,   26,   52,   52,   13,   15,   15,   15,   20,
  563.       184,   21,   13,  170,   13,   13,   13,  160,   15,   23,
  564.        29,   34,    7,    9,    9,    9,   13,  112,  112,    9,
  565.       159,   20,    9,   21,    9,    9,   24,   24,   24,    9,
  566.        15,   23,   29,   34,   36,   39,   24,   45,   13,    9,
  567.  
  568.        16,   16,   16,   16,   16,  158,   31,   31,   31,   16,
  569.       157,   46,  156,   48,   24,  155,   36,   39,   31,   45,
  570.        16,   16,   28,  154,   28,   28,  153,   28,   49,   28,
  571.       128,  128,   28,   46,   28,   48,  152,   28,   28,   28,
  572.        31,   28,   37,   37,   37,   40,   40,   40,   41,   37,
  573.        49,   67,   40,   53,   53,   53,   69,   41,   41,   41,
  574.        37,   37,   71,   40,   40,   42,   72,   42,   74,  151,
  575.        42,   42,   42,   67,   76,  150,  149,   78,   69,   70,
  576.        70,   70,   79,  148,   71,  147,   70,   77,   72,   77,
  577.        74,   70,   77,   77,   77,   99,   76,   70,   70,   78,
  578.  
  579.        81,   81,   81,   82,   79,   82,  100,   81,   82,   82,
  580.        82,  146,  145,   70,   84,   84,   84,   99,   81,   81,
  581.        83,   83,   83,   85,   85,   85,   83,  103,  100,   83,
  582.       144,   83,   86,   86,   86,  102,   83,  102,  104,  143,
  583.       102,  102,  102,  106,  106,  106,   83,  142,  141,  103,
  584.       140,  138,  102,  107,  107,  107,  108,  108,  108,  137,
  585.       104,  109,  109,  109,  136,  110,  110,  110,  124,  124,
  586.       124,  125,  125,  125,  102,  110,  135,  134,  133,  132,
  587.       124,  131,  130,  125,  127,  123,  121,  120,  119,  118,
  588.       117,  116,  115,  110,  114,  111,   98,   97,   96,   95,
  589.  
  590.        94,   93,  124,   92,   91,  125,  162,   90,  162,  162,
  591.       163,  163,  163,  163,  164,   89,  164,  164,  165,  165,
  592.       165,  165,  165,  166,  166,  166,  166,  166,  167,  167,
  593.       167,  167,  167,  168,  168,  168,  168,  168,  169,  169,
  594.       169,  169,  169,  171,  171,  171,  171,  171,  172,   87,
  595.       172,  172,  173,  173,  173,  173,  173,  174,  174,  174,
  596.       174,  174,  175,   66,  175,  175,  176,  176,  176,  176,
  597.       176,  177,  177,  177,  177,  177,  178,  178,  179,  179,
  598.       179,  179,  179,  180,  180,  180,  180,  180,  181,  181,
  599.       181,  181,  181,  182,  182,  182,  182,  182,  183,  183,
  600.  
  601.       183,  183,  183,  185,  185,   65,   64,   63,   62,   61,
  602.        60,   59,   58,   57,   54,   43,   30,   25,   17,   14,
  603.         3,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  604.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  605.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  606.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  607.       161,  161,  161,  161,  161,  161,  161,  161,  161,  161,
  608.       161,  161
  609.     } ;
  610.  
  611. static yy_state_type yy_last_accepting_state;
  612. static YY_CHAR *yy_last_accepting_cpos;
  613.  
  614. /* the intent behind this definition is that it'll catch
  615.  * any uses of REJECT which flex missed
  616.  */
  617. #define REJECT reject_used_but_not_detected
  618. #define yymore() yymore_used_but_not_detected
  619. #define YY_MORE_ADJ 0
  620.  
  621. /* these variables are all declared out here so that section 3 code can
  622.  * manipulate them
  623.  */
  624. /* points to current character in buffer */
  625. static YY_CHAR *yy_c_buf_p = (YY_CHAR *) 0;
  626. static int yy_init = 1;        /* whether we need to initialize */
  627. static int yy_start = 0;    /* start state number */
  628.  
  629. /* flag which is used to allow yywrap()'s to do buffer switches
  630.  * instead of setting up a fresh yyin.  A bit of a hack ...
  631.  */
  632. static int yy_did_buffer_switch_on_eof;
  633.  
  634. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  635. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  636. static int yy_get_next_buffer YY_PROTO(( void ));
  637. static void yyunput YY_PROTO(( YY_CHAR c, YY_CHAR *buf_ptr ));
  638. void yyrestart YY_PROTO(( FILE *input_file ));
  639. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  640. void yy_load_buffer_state YY_PROTO(( void ));
  641. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  642. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  643. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  644.  
  645. #define yy_new_buffer yy_create_buffer
  646.  
  647. #ifdef __cplusplus
  648. static int yyinput YY_PROTO(( void ));
  649. #else
  650. static int input YY_PROTO(( void ));
  651. #endif
  652.  
  653. YY_DECL
  654.     {
  655.     register yy_state_type yy_current_state;
  656.     register YY_CHAR *yy_cp, *yy_bp;
  657.     register int yy_act;
  658.  
  659.  
  660.  
  661.  
  662.     if ( yy_init )
  663.     {
  664.     YY_USER_INIT;
  665.  
  666.     if ( ! yy_start )
  667.         yy_start = 1;    /* first start state */
  668.  
  669.     if ( ! yyin )
  670.         yyin = stdin;
  671.  
  672.     if ( ! yyout )
  673.         yyout = stdout;
  674.  
  675.     if ( yy_current_buffer )
  676.         yy_init_buffer( yy_current_buffer, yyin );
  677.     else
  678.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  679.  
  680.     yy_load_buffer_state();
  681.  
  682.     yy_init = 0;
  683.     }
  684.  
  685.     while ( 1 )        /* loops until end-of-file is reached */
  686.     {
  687.     yy_cp = yy_c_buf_p;
  688.  
  689.     /* support of yytext */
  690.     *yy_cp = yy_hold_char;
  691.  
  692.     /* yy_bp points to the position in yy_ch_buf of the start of the
  693.      * current run.
  694.      */
  695.     yy_bp = yy_cp;
  696.  
  697.     yy_current_state = yy_start;
  698. yy_match:
  699.     do
  700.         {
  701.         register YY_CHAR yy_c = yy_ec[*yy_cp];
  702.         if ( yy_accept[yy_current_state] )
  703.         {
  704.         yy_last_accepting_state = yy_current_state;
  705.         yy_last_accepting_cpos = yy_cp;
  706.         }
  707.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  708.         {
  709.         yy_current_state = yy_def[yy_current_state];
  710.         if ( yy_current_state >= 162 )
  711.             yy_c = yy_meta[yy_c];
  712.         }
  713.         yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  714.         ++yy_cp;
  715.         }
  716.     while ( yy_current_state != 161 );
  717.     yy_cp = yy_last_accepting_cpos;
  718.     yy_current_state = yy_last_accepting_state;
  719.  
  720. yy_find_action:
  721.     yy_act = yy_accept[yy_current_state];
  722.  
  723.     YY_DO_BEFORE_ACTION;
  724.     YY_USER_ACTION;
  725.  
  726. do_action:    /* this label is used only to access EOF actions */
  727.  
  728.  
  729.     switch ( yy_act )
  730.         {
  731.         case 0: /* must backtrack */
  732.         /* undo the effects of YY_DO_BEFORE_ACTION */
  733.         *yy_cp = yy_hold_char;
  734.         yy_cp = yy_last_accepting_cpos;
  735.         yy_current_state = yy_last_accepting_state;
  736.         goto yy_find_action;
  737.  
  738. case YY_STATE_EOF(INITIAL):
  739. # line 232 "parser.lex"
  740. { return(END_OF_STREAM); }
  741.     YY_BREAK
  742. case 2:
  743. # line 234 "parser.lex"
  744. {lex_input_line_number++;}
  745.     YY_BREAK
  746. case 3:
  747. # line 236 "parser.lex"
  748. {if (yytext[0]=='\n') lex_input_line_number++;}
  749.     YY_BREAK
  750. case 4:
  751. # line 238 "parser.lex"
  752. { return(DOT); }
  753.     YY_BREAK
  754. case 5:
  755. # line 240 "parser.lex"
  756. { return(PAIR_BEGIN); }
  757.     YY_BREAK
  758. case 6:
  759. # line 242 "parser.lex"
  760. { return(PAIR_END); }
  761.     YY_BREAK
  762. case 7:
  763. # line 244 "parser.lex"
  764. { return(QUOTATION); }
  765.     YY_BREAK
  766. case 8:
  767. # line 246 "parser.lex"
  768. { return(ANTI_QUOTATION); }
  769.     YY_BREAK
  770. case 9:
  771. # line 248 "parser.lex"
  772. { return(UNQUOTATION); }
  773.     YY_BREAK
  774. case 10:
  775. # line 250 "parser.lex"
  776. { return(UNQUOTE_SPLICE); }
  777.     YY_BREAK
  778. case 11:
  779. # line 252 "parser.lex"
  780. { return(EXTENSION); }
  781.     YY_BREAK
  782. case 12:
  783. # line 254 "parser.lex"
  784. { flex_floatval = convert_float();
  785.           pptok.float_val = flex_floatval;
  786.           return(TFLOAT); }
  787.     YY_BREAK
  788. case 13:
  789. # line 258 "parser.lex"
  790. { convert_rational();
  791.           pptok.int_val = flex_ratnumval;
  792.           pptok.rat_den_val = flex_ratdenval;
  793.           return(TRATIONAL); }
  794.     YY_BREAK
  795. case 14:
  796. # line 263 "parser.lex"
  797. { flex_intval = convert_integer(yytext, 2);
  798.           pptok.int_val = flex_intval;
  799.           return(TINTEGER); }
  800.     YY_BREAK
  801. case 15:
  802. # line 267 "parser.lex"
  803. { flex_intval = convert_integer(yytext, 8);
  804.           pptok.int_val = flex_intval;
  805.           return(TINTEGER); }
  806.     YY_BREAK
  807. case 16:
  808. # line 271 "parser.lex"
  809. { flex_intval = atol(yytext);
  810.           pptok.int_val = flex_intval;
  811.           return(TINTEGER); }
  812.     YY_BREAK
  813. case 17:
  814. # line 275 "parser.lex"
  815. { flex_intval = convert_integer(yytext, 16);
  816.           pptok.int_val = flex_intval;
  817.           return(TINTEGER); }
  818.     YY_BREAK
  819. case 18:
  820. # line 279 "parser.lex"
  821. { int returns;
  822.               flex_intval = int_with_base(yytext, &returns);
  823.               if (returns != yyleng) yyless(returns);
  824.               pptok.int_val = flex_intval;
  825.               return(TINTEGER); }
  826.     YY_BREAK
  827. case 19:
  828. # line 285 "parser.lex"
  829. { convert_string();
  830.           pptok.string_val = allocate_string(stacktop,flex_stringval,
  831.                              strlen(flex_stringval));
  832.           return(TSTRING); }
  833.     YY_BREAK
  834. case 20:
  835. # line 290 "parser.lex"
  836. { flex_charval = convert_character();
  837.           pptok.char_val = flex_charval;
  838.           return(TCHAR); }
  839.     YY_BREAK
  840. case 21:
  841. # line 294 "parser.lex"
  842. { tidy_id();
  843.           pptok.sym_val = flex_idval;
  844.           return(IDENTIFIER); }
  845.     YY_BREAK
  846. case 22:
  847. # line 298 "parser.lex"
  848. { fprintf(stderr, "\n*** Illegal Character '%s' ignored\n",
  849.               visible(*yytext)); }
  850.     YY_BREAK
  851. case 23:
  852. # line 301 "parser.lex"
  853. ECHO;
  854.     YY_BREAK
  855.  
  856.         case YY_END_OF_BUFFER:
  857.         {
  858.         /* amount of text matched not including the EOB char */
  859.         int yy_amount_of_matched_text = yy_cp - yytext - 1;
  860.  
  861.         /* undo the effects of YY_DO_BEFORE_ACTION */
  862.         *yy_cp = yy_hold_char;
  863.  
  864.         /* note that here we test for yy_c_buf_p "<=" to the position
  865.          * of the first EOB in the buffer, since yy_c_buf_p will
  866.          * already have been incremented past the NUL character
  867.          * (since all states make transitions on EOB to the end-
  868.          * of-buffer state).  Contrast this with the test in yyinput().
  869.          */
  870.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  871.             /* this was really a NUL */
  872.             {
  873.             yy_state_type yy_next_state;
  874.  
  875.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  876.  
  877.             yy_current_state = yy_get_previous_state();
  878.  
  879.             /* okay, we're now positioned to make the
  880.              * NUL transition.  We couldn't have
  881.              * yy_get_previous_state() go ahead and do it
  882.              * for us because it doesn't know how to deal
  883.              * with the possibility of jamming (and we
  884.              * don't want to build jamming into it because
  885.              * then it will run more slowly)
  886.              */
  887.  
  888.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  889.  
  890.             yy_bp = yytext + YY_MORE_ADJ;
  891.  
  892.             if ( yy_next_state )
  893.             {
  894.             /* consume the NUL */
  895.             yy_cp = ++yy_c_buf_p;
  896.             yy_current_state = yy_next_state;
  897.             goto yy_match;
  898.             }
  899.  
  900.             else
  901.             {
  902.                 yy_cp = yy_last_accepting_cpos;
  903.                 yy_current_state = yy_last_accepting_state;
  904.             goto yy_find_action;
  905.             }
  906.             }
  907.  
  908.         else switch ( yy_get_next_buffer() )
  909.             {
  910.             case EOB_ACT_END_OF_FILE:
  911.             {
  912.             yy_did_buffer_switch_on_eof = 0;
  913.  
  914.             if ( yywrap() )
  915.                 {
  916.                 /* note: because we've taken care in
  917.                  * yy_get_next_buffer() to have set up yytext,
  918.                  * we can now set up yy_c_buf_p so that if some
  919.                  * total hoser (like flex itself) wants
  920.                  * to call the scanner after we return the
  921.                  * YY_NULL, it'll still work - another YY_NULL
  922.                  * will get returned.
  923.                  */
  924.                 yy_c_buf_p = yytext + YY_MORE_ADJ;
  925.  
  926.                 yy_act = YY_STATE_EOF((yy_start - 1) / 2);
  927.                 goto do_action;
  928.                 }
  929.  
  930.             else
  931.                 {
  932.                 if ( ! yy_did_buffer_switch_on_eof )
  933.                 YY_NEW_FILE;
  934.                 }
  935.             }
  936.             break;
  937.  
  938.             case EOB_ACT_CONTINUE_SCAN:
  939.             yy_c_buf_p = yytext + yy_amount_of_matched_text;
  940.  
  941.             yy_current_state = yy_get_previous_state();
  942.  
  943.             yy_cp = yy_c_buf_p;
  944.             yy_bp = yytext + YY_MORE_ADJ;
  945.             goto yy_match;
  946.  
  947.             case EOB_ACT_LAST_MATCH:
  948.             yy_c_buf_p =
  949.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  950.  
  951.             yy_current_state = yy_get_previous_state();
  952.  
  953.             yy_cp = yy_c_buf_p;
  954.             yy_bp = yytext + YY_MORE_ADJ;
  955.             goto yy_find_action;
  956.             }
  957.         break;
  958.         }
  959.  
  960.         default:
  961. #ifdef FLEX_DEBUG
  962.         printf( "action # %d\n", yy_act );
  963. #endif
  964.         YY_FATAL_ERROR(
  965.             "fatal flex scanner internal error--no action found" );
  966.         }
  967.     }
  968.     }
  969.  
  970.  
  971. /* yy_get_next_buffer - try to read in a new buffer
  972.  *
  973.  * synopsis
  974.  *     int yy_get_next_buffer();
  975.  *     
  976.  * returns a code representing an action
  977.  *     EOB_ACT_LAST_MATCH - 
  978.  *     EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  979.  *     EOB_ACT_END_OF_FILE - end of file
  980.  */
  981.  
  982. static int yy_get_next_buffer()
  983.  
  984.     {
  985.     register YY_CHAR *dest = yy_current_buffer->yy_ch_buf;
  986.     register YY_CHAR *source = yytext - 1; /* copy prev. char, too */
  987.     register int number_to_move, i;
  988.     int ret_val;
  989.  
  990.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  991.     YY_FATAL_ERROR(
  992.         "fatal flex scanner internal error--end of buffer missed" );
  993.  
  994.     /* try to read more data */
  995.  
  996.     /* first move last chars to start of buffer */
  997.     number_to_move = yy_c_buf_p - yytext;
  998.  
  999.     for ( i = 0; i < number_to_move; ++i )
  1000.     *(dest++) = *(source++);
  1001.  
  1002.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  1003.     /* don't do the read, it's not guaranteed to return an EOF,
  1004.      * just force an EOF
  1005.      */
  1006.     yy_n_chars = 0;
  1007.  
  1008.     else
  1009.     {
  1010.     int num_to_read = yy_current_buffer->yy_buf_size - number_to_move - 1;
  1011.  
  1012.     if ( num_to_read > YY_READ_BUF_SIZE )
  1013.         num_to_read = YY_READ_BUF_SIZE;
  1014.  
  1015.     else if ( num_to_read <= 0 )
  1016.         YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" );
  1017.  
  1018.     /* read in more data */
  1019.     YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  1020.           yy_n_chars, num_to_read );
  1021.     }
  1022.  
  1023.     if ( yy_n_chars == 0 )
  1024.     {
  1025.     if ( number_to_move == 1 )
  1026.         {
  1027.         ret_val = EOB_ACT_END_OF_FILE;
  1028.         yy_current_buffer->yy_eof_status = EOF_DONE;
  1029.         }
  1030.  
  1031.     else
  1032.         {
  1033.         ret_val = EOB_ACT_LAST_MATCH;
  1034.         yy_current_buffer->yy_eof_status = EOF_PENDING;
  1035.         }
  1036.     }
  1037.  
  1038.     else
  1039.     ret_val = EOB_ACT_CONTINUE_SCAN;
  1040.  
  1041.     yy_n_chars += number_to_move;
  1042.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  1043.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  1044.  
  1045.     /* yytext begins at the second character in yy_ch_buf; the first
  1046.      * character is the one which preceded it before reading in the latest
  1047.      * buffer; it needs to be kept around in case it's a newline, so
  1048.      * yy_get_previous_state() will have with '^' rules active
  1049.      */
  1050.  
  1051.     yytext = &yy_current_buffer->yy_ch_buf[1];
  1052.  
  1053.     return ( ret_val );
  1054.     }
  1055.  
  1056.  
  1057. /* yy_get_previous_state - get the state just before the EOB char was reached
  1058.  *
  1059.  * synopsis
  1060.  *     yy_state_type yy_get_previous_state();
  1061.  */
  1062.  
  1063. static yy_state_type yy_get_previous_state()
  1064.  
  1065.     {
  1066.     register yy_state_type yy_current_state;
  1067.     register YY_CHAR *yy_cp;
  1068.  
  1069.     yy_current_state = yy_start;
  1070.  
  1071.     for ( yy_cp = yytext + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  1072.     {
  1073.     register YY_CHAR yy_c = (*yy_cp ? yy_ec[*yy_cp] : 1);
  1074.     if ( yy_accept[yy_current_state] )
  1075.         {
  1076.         yy_last_accepting_state = yy_current_state;
  1077.         yy_last_accepting_cpos = yy_cp;
  1078.         }
  1079.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1080.         {
  1081.         yy_current_state = yy_def[yy_current_state];
  1082.         if ( yy_current_state >= 162 )
  1083.         yy_c = yy_meta[yy_c];
  1084.         }
  1085.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1086.     }
  1087.  
  1088.     return ( yy_current_state );
  1089.     }
  1090.  
  1091.  
  1092. /* yy_try_NUL_trans - try to make a transition on the NUL character
  1093.  *
  1094.  * synopsis
  1095.  *     next_state = yy_try_NUL_trans( current_state );
  1096.  */
  1097.  
  1098. #ifdef YY_USE_PROTOS
  1099. static yy_state_type yy_try_NUL_trans( register yy_state_type yy_current_state )
  1100. #else
  1101. static yy_state_type yy_try_NUL_trans( yy_current_state )
  1102. register yy_state_type yy_current_state;
  1103. #endif
  1104.  
  1105.     {
  1106.     register int yy_is_jam;
  1107.     register YY_CHAR *yy_cp = yy_c_buf_p;
  1108.  
  1109.     register YY_CHAR yy_c = 1;
  1110.     if ( yy_accept[yy_current_state] )
  1111.     {
  1112.     yy_last_accepting_state = yy_current_state;
  1113.     yy_last_accepting_cpos = yy_cp;
  1114.     }
  1115.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  1116.     {
  1117.     yy_current_state = yy_def[yy_current_state];
  1118.     if ( yy_current_state >= 162 )
  1119.         yy_c = yy_meta[yy_c];
  1120.     }
  1121.     yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c];
  1122.     yy_is_jam = (yy_current_state == 161);
  1123.  
  1124.     return ( yy_is_jam ? 0 : yy_current_state );
  1125.     }
  1126.  
  1127.  
  1128. #ifdef YY_USE_PROTOS
  1129. static void yyunput( YY_CHAR c, register YY_CHAR *yy_bp )
  1130. #else
  1131. static void yyunput( c, yy_bp )
  1132. YY_CHAR c;
  1133. register YY_CHAR *yy_bp;
  1134. #endif
  1135.  
  1136.     {
  1137.     register YY_CHAR *yy_cp = yy_c_buf_p;
  1138.  
  1139.     /* undo effects of setting up yytext */
  1140.     *yy_cp = yy_hold_char;
  1141.  
  1142.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1143.     { /* need to shift things up to make room */
  1144.     register int number_to_move = yy_n_chars + 2; /* +2 for EOB chars */
  1145.     register YY_CHAR *dest =
  1146.         &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + 2];
  1147.     register YY_CHAR *source =
  1148.         &yy_current_buffer->yy_ch_buf[number_to_move];
  1149.  
  1150.     while ( source > yy_current_buffer->yy_ch_buf )
  1151.         *--dest = *--source;
  1152.  
  1153.     yy_cp += dest - source;
  1154.     yy_bp += dest - source;
  1155.     yy_n_chars = yy_current_buffer->yy_buf_size;
  1156.  
  1157.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1158.         YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1159.     }
  1160.  
  1161.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1162.     yy_cp[-2] = '\n';
  1163.  
  1164.     *--yy_cp = c;
  1165.  
  1166.     /* note: the formal parameter *must* be called "yy_bp" for this
  1167.      *       macro to now work correctly
  1168.      */
  1169.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  1170.     }
  1171.  
  1172.  
  1173. #ifdef __cplusplus
  1174. static int yyinput()
  1175. #else
  1176. static int input()
  1177. #endif
  1178.  
  1179.     {
  1180.     int c;
  1181.     YY_CHAR *yy_cp = yy_c_buf_p;
  1182.  
  1183.     *yy_cp = yy_hold_char;
  1184.  
  1185.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1186.     {
  1187.     /* yy_c_buf_p now points to the character we want to return.
  1188.      * If this occurs *before* the EOB characters, then it's a
  1189.      * valid NUL; if not, then we've hit the end of the buffer.
  1190.      */
  1191.     if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1192.         /* this was really a NUL */
  1193.         *yy_c_buf_p = '\0';
  1194.  
  1195.     else
  1196.         { /* need more input */
  1197.         yytext = yy_c_buf_p;
  1198.         ++yy_c_buf_p;
  1199.  
  1200.         switch ( yy_get_next_buffer() )
  1201.         {
  1202.         case EOB_ACT_END_OF_FILE:
  1203.             {
  1204.             if ( yywrap() )
  1205.             {
  1206.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  1207.             return ( EOF );
  1208.             }
  1209.  
  1210.             YY_NEW_FILE;
  1211.  
  1212. #ifdef __cplusplus
  1213.             return ( yyinput() );
  1214. #else
  1215.             return ( input() );
  1216. #endif
  1217.             }
  1218.             break;
  1219.  
  1220.         case EOB_ACT_CONTINUE_SCAN:
  1221.             yy_c_buf_p = yytext + YY_MORE_ADJ;
  1222.             break;
  1223.  
  1224.         case EOB_ACT_LAST_MATCH:
  1225. #ifdef __cplusplus
  1226.             YY_FATAL_ERROR( "unexpected last match in yyinput()" );
  1227. #else
  1228.             YY_FATAL_ERROR( "unexpected last match in input()" );
  1229. #endif
  1230.         }
  1231.         }
  1232.     }
  1233.  
  1234.     c = *yy_c_buf_p;
  1235.     yy_hold_char = *++yy_c_buf_p;
  1236.  
  1237.     return ( c );
  1238.     }
  1239.  
  1240.  
  1241. #ifdef YY_USE_PROTOS
  1242. void yyrestart( FILE *input_file )
  1243. #else
  1244. void yyrestart( input_file )
  1245. FILE *input_file;
  1246. #endif
  1247.  
  1248.     {
  1249.     yy_init_buffer( yy_current_buffer, input_file );
  1250.     yy_load_buffer_state();
  1251.     }
  1252.  
  1253.  
  1254. #ifdef YY_USE_PROTOS
  1255. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1256. #else
  1257. void yy_switch_to_buffer( new_buffer )
  1258. YY_BUFFER_STATE new_buffer;
  1259. #endif
  1260.  
  1261.     {
  1262.     if ( yy_current_buffer == new_buffer )
  1263.     return;
  1264.  
  1265.     if ( yy_current_buffer )
  1266.     {
  1267.     /* flush out information for old buffer */
  1268.     *yy_c_buf_p = yy_hold_char;
  1269.     yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1270.     yy_current_buffer->yy_n_chars = yy_n_chars;
  1271.     }
  1272.  
  1273.     yy_current_buffer = new_buffer;
  1274.     yy_load_buffer_state();
  1275.  
  1276.     /* we don't actually know whether we did this switch during
  1277.      * EOF (yywrap()) processing, but the only time this flag
  1278.      * is looked at is after yywrap() is called, so it's safe
  1279.      * to go ahead and always set it.
  1280.      */
  1281.     yy_did_buffer_switch_on_eof = 1;
  1282.     }
  1283.  
  1284.  
  1285. #ifdef YY_USE_PROTOS
  1286. void yy_load_buffer_state( void )
  1287. #else
  1288. void yy_load_buffer_state()
  1289. #endif
  1290.  
  1291.     {
  1292.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1293.     yytext = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1294.     yyin = yy_current_buffer->yy_input_file;
  1295.     yy_hold_char = *yy_c_buf_p;
  1296.     }
  1297.  
  1298.  
  1299. #ifdef YY_USE_PROTOS
  1300. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1301. #else
  1302. YY_BUFFER_STATE yy_create_buffer( file, size )
  1303. FILE *file;
  1304. int size;
  1305. #endif
  1306.  
  1307.     {
  1308.     YY_BUFFER_STATE b;
  1309.  
  1310.     b = (YY_BUFFER_STATE) malloc( sizeof( struct yy_buffer_state ) );
  1311.  
  1312.     if ( ! b )
  1313.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1314.  
  1315.     b->yy_buf_size = size;
  1316.  
  1317.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1318.      * we need to put in 2 end-of-buffer characters.
  1319.      */
  1320.     b->yy_ch_buf = (YY_CHAR *) malloc( (unsigned) (b->yy_buf_size + 2) );
  1321.  
  1322.     if ( ! b->yy_ch_buf )
  1323.     YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1324.  
  1325.     yy_init_buffer( b, file );
  1326.  
  1327.     return ( b );
  1328.     }
  1329.  
  1330.  
  1331. #ifdef YY_USE_PROTOS
  1332. void yy_delete_buffer( YY_BUFFER_STATE b )
  1333. #else
  1334. void yy_delete_buffer( b )
  1335. YY_BUFFER_STATE b;
  1336. #endif
  1337.  
  1338.     {
  1339.     if ( b == yy_current_buffer )
  1340.     yy_current_buffer = (YY_BUFFER_STATE) 0;
  1341.  
  1342.     free( (char *) b->yy_ch_buf );
  1343.     free( (char *) b );
  1344.     }
  1345.  
  1346.  
  1347. #ifdef YY_USE_PROTOS
  1348. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1349. #else
  1350. void yy_init_buffer( b, file )
  1351. YY_BUFFER_STATE b;
  1352. FILE *file;
  1353. #endif
  1354.  
  1355.     {
  1356.     b->yy_input_file = file;
  1357.  
  1358.     /* we put in the '\n' and start reading from [1] so that an
  1359.      * initial match-at-newline will be true.
  1360.      */
  1361.  
  1362.     b->yy_ch_buf[0] = '\n';
  1363.     b->yy_n_chars = 1;
  1364.  
  1365.     /* we always need two end-of-buffer characters.  The first causes
  1366.      * a transition to the end-of-buffer state.  The second causes
  1367.      * a jam in that state.
  1368.      */
  1369.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1370.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  1371.  
  1372.     b->yy_buf_pos = &b->yy_ch_buf[1];
  1373.  
  1374.     b->yy_eof_status = EOF_NOT_SEEN;
  1375.     }
  1376. # line 301 "parser.lex"
  1377.  
  1378.  
  1379. /* +#o123 or -#o123 or #o123 or binary or hex */
  1380. static long convert_integer OF ((char *text, int base),
  1381. (text, base),
  1382. char *text;
  1383. int base;)
  1384. {
  1385.   switch (*text) {
  1386.   case '+':
  1387.     return strtol(text + 3, 0, base);
  1388.   case '-':
  1389.     return -strtol(text + 3, 0, base);
  1390.   default:
  1391.     return strtol(text + 2, 0, base);
  1392.   }
  1393. }
  1394.  
  1395. /* +#5r123 or -#5r123 or #5r123 */
  1396. static long int_with_base OF ((char *text, int *ret),
  1397. (text, ret),
  1398. char *text;
  1399. int *ret;)
  1400. {
  1401.   char *val;
  1402.   int base;
  1403.   long value;
  1404.  
  1405.   switch (*text) {
  1406.   case '+':
  1407.     base = (int)strtol(text + 2, &val, 10);
  1408.     value = strtol(val + 1, &val, base);
  1409.     break;
  1410.   case '-':
  1411.     base = (int)strtol(text + 2, &val, 10);
  1412.     value = -strtol(val + 1, &val, base);
  1413.     break;
  1414.   default:
  1415.     base = (int)strtol(text + 1, &val, 10);
  1416.     value = strtol(val + 1, &val, base);
  1417.     break;
  1418.   }
  1419.  
  1420.   /* all characters used? */
  1421.   *ret = (val - text)/sizeof(char);
  1422.  
  1423.   return value;
  1424. }
  1425.  
  1426. /* 123 or #o123 or #5r123 */
  1427. static long convert_unumber OF ((char *text),
  1428. (text),
  1429. char *text;)
  1430. {
  1431.   char *val;
  1432.   int base;
  1433.  
  1434.   if (*text == '#')
  1435.     switch (text[1]) {
  1436.     case 'b':
  1437.     case 'B':
  1438.       return convert_integer(text, 2);
  1439.     case 'o':
  1440.     case 'O':
  1441.       return convert_integer(text, 8);
  1442.     case 'x':
  1443.     case 'X':
  1444.       return convert_integer(text, 16);
  1445.     default:
  1446.       base = (int)strtol(text + 1, &val, 10);
  1447.       return strtol(val + 1, 0, base);
  1448.     }
  1449.  
  1450.   return atol(text);
  1451. }
  1452.  
  1453. /* +num/num or -num/num or num/num */
  1454. #ifdef __STDC__
  1455. static void convert_rational(void)
  1456. #else
  1457. static void convert_rational()
  1458. #endif
  1459. {
  1460.   char *text = yytext;
  1461.   int sign;
  1462.  
  1463.   if (*text == '+') {
  1464.     sign = 1;
  1465.     text++;
  1466.   }
  1467.   else if (*text == '-') {
  1468.     sign = -1;
  1469.     text++;
  1470.   }
  1471.   else {
  1472.     sign = 1;
  1473.   }
  1474.  
  1475.   flex_ratnumval = sign*convert_unumber(text);
  1476.   text = strchr(text, '/');
  1477.   flex_ratdenval = convert_unumber(text + 1);
  1478.  
  1479. }
  1480.  
  1481. /* #\a or #\^a or #\alert */
  1482. /* ASCII dependent */
  1483. #ifdef __STDC__
  1484. static char convert_character(void)
  1485. #else
  1486. static char convert_character()
  1487. #endif
  1488. {
  1489.   register int i;
  1490.   for(i=0;i<yyleng;i++)
  1491.     if (yytext[i]=='\n') lex_input_line_number++;
  1492.   if (yyleng == 4) {        /* #\^a or #\^A */
  1493.     if ('a' <= yytext[3] && yytext[3] <= 'z')
  1494.       return (yytext[3] - 'a' + 'A') & 077;
  1495.     else
  1496.       return yytext[3] & 077;
  1497.   }
  1498.  
  1499.   if (yyleng > 4) {        /* #\alert etc */
  1500.     switch (yytext[2]) {
  1501.     case 'a':            /* alert 07 */
  1502.       return 07;        /* Stardent is non-ansi here */
  1503.     case 'b':            /* backspace 010 */
  1504.       return '\b';
  1505.     case 'd':            /* delete 0177 */
  1506.       return 0177;
  1507.     case 'f':            /* formfeed 014 */
  1508.       return '\f';
  1509.     case 'l':            /* linefeed 012 */
  1510.     case 'n':                   /* newline 012 */
  1511.       return '\n';
  1512.     case 'r':            /* return 015 */
  1513.       return '\r';
  1514.     case 't':            /* tab 011 */
  1515.       return '\t';
  1516.     case 's':            /* space 040 */
  1517.       return ' ';
  1518.     case 'v':            /* vertical-tab 013 */
  1519.       return '\v';
  1520.     }
  1521.   }  
  1522.   return yytext[2];
  1523. }
  1524.  
  1525. /* get all the escapes out of the identifier: produce the internal form */
  1526. #ifdef __STDC__
  1527. static void tidy_id(void)
  1528. #else
  1529. static void tidy_id()
  1530. #endif
  1531. {
  1532.   int escaped = 0;
  1533.   int i, j;
  1534.  
  1535.   for (i = 0; yytext[i]; i++)
  1536.     if (yytext[i] == '|' ||
  1537.     yytext[i] == '\\') {
  1538.       escaped = 1;
  1539.       break;
  1540.     }
  1541.     
  1542.   if (!escaped) {
  1543.     strcpy(flex_idval, yytext);
  1544.     return;
  1545.   }
  1546.  
  1547.   i = 0;
  1548.   j = 0;
  1549.   while (yytext[j]) {
  1550.     if (yytext[j] == '\\') {
  1551.       if (yytext[j+1] == '|') {
  1552.         flex_idval[i++] = '|';
  1553.         j++;
  1554.       }
  1555.       else if (yytext[j+1] == '\\') {
  1556.         flex_idval[i++] = '\\';
  1557.         j++;
  1558.       }
  1559.       else if (yytext[j+1] == '\n') {
  1560.     lex_input_line_number++;
  1561.     flex_idval[i++] = '\n';
  1562.     j++;
  1563.       }
  1564.       j++;
  1565.     } else if (yytext[j] == '|') j++;
  1566.     else {            /* Copy the text, checking for newline */
  1567.       if ((flex_idval[i++] = yytext[j++])=='\n')
  1568.     lex_input_line_number++;
  1569.     }
  1570.   }
  1571.  
  1572.   flex_idval[i] = 0;
  1573. }
  1574.  
  1575. /* do we need to escape this id when printing?
  1576.  * yes if (1) it contains a dodgy character
  1577.  *        (2) it is the id of zero length
  1578.  *        (3) it starts with the syntax of a number
  1579.  *
  1580.  * ASCII dependent
  1581.  */
  1582. int escaped_id OF ((char *id),
  1583. (id),
  1584. char *id;)
  1585. {
  1586.   int i;
  1587.  
  1588.   for (i = 0; id[i]; i++)
  1589.     if (id[i] < 32 || id[i] > 126 || id[i] == '|' || id[i] == '\\') return 1;
  1590.  
  1591.   if (strpbrk(id, "|\\#()\"',;` ") ||
  1592.       id[0] == 0 ||        /* zero length id */
  1593.       isdigit(id[0]) ||                    /* 123 */
  1594.       (id[0] == '.' && !id[1]) ||            /* |.| */
  1595.       (id[0] == '.' && id[1] && isdigit(id[1])) ||    /* .123 */
  1596.       ((id[0] == '+' || id[0] == '-') &&
  1597.     id[1] && (isdigit(id[1]) ||            /* +123 */
  1598.               (id[1] == '.' && id[2] && isdigit(id[2]))))) /* +.123 */
  1599.     return 1;
  1600.   else
  1601.     return 0;
  1602. }
  1603.  
  1604. #ifdef __STDC__
  1605. static void convert_string(void)
  1606. #else
  1607. static void convert_string()
  1608. #endif
  1609. {
  1610.   int ch, prevch;
  1611.   int i;
  1612.  
  1613.   i = 0;
  1614.   while ((ch = input()) != '"') {
  1615.     if (ch == '\\')
  1616.       switch (ch = input()) {
  1617.       case '"':
  1618.       case '\\':
  1619.     flex_stringval[i++] = ch;
  1620.     break;
  1621.       case 'n':
  1622.       case 'N':
  1623.     flex_stringval[i++] = '\n';
  1624.     break;
  1625.       case 'x':
  1626.       case 'X':
  1627.     prevch = ch;
  1628.     if (isxdigit(ch = input())) {
  1629.       char val = 0;
  1630.       int count;
  1631.       for (count = 0; count < 4 && isxdigit(ch); count++, ch = input()) {
  1632.         val = 16*val;
  1633.         if (isupper(ch)) val += ch - 'A' + 10;
  1634.         else if (islower(ch)) val += ch - 'a' + 10;
  1635.         else val += ch - '0';
  1636.       }
  1637.       flex_stringval[i++] = val;
  1638.     }
  1639.     else flex_stringval[i++] = prevch;
  1640.     unput(ch);
  1641.     break;
  1642.       default:
  1643.     flex_stringval[i++] = ch;
  1644.     break;
  1645.       }
  1646.     else flex_stringval[i++] = ch;
  1647.     if (ch == '\n') lex_input_line_number++;
  1648.   }
  1649.  
  1650.   flex_stringval[i] = 0;
  1651.  
  1652. }
  1653.  
  1654. #ifdef __STDC__
  1655. static double convert_float(void)
  1656. #else
  1657. static double convert_float()
  1658. #endif
  1659. {
  1660. #ifdef __ANSI__
  1661.   extern double atof(char *);
  1662. #else
  1663.   extern double atof();
  1664. #endif
  1665.  
  1666.   char buf[256];
  1667.   int i;
  1668.  
  1669.   for (i = 0; yytext[i]; i++)
  1670.     buf[i] = (yytext[i] == 'd' || yytext[i] == 'D') ? 'E' : yytext[i];
  1671.   buf[i] = 0;
  1672.  
  1673.   return atof(buf);
  1674. }
  1675.  
  1676. /* more ASCII dependence */
  1677. char *visible OF ((char ch),
  1678. (ch),
  1679. char ch;)
  1680. {
  1681.   static char buf[10];
  1682.   char *ptr = buf;
  1683.  
  1684.   if (ch == 127) return "^?";
  1685.  
  1686.   if (ch > 127) {
  1687.     *ptr++ = 'M';
  1688.     *ptr++ = '-';
  1689.     ch = ch & 0x7f;
  1690.   }
  1691.  
  1692.   if (ch < 32) {
  1693.     *ptr++ = '^';
  1694.     ch += '@';
  1695.   }
  1696.  
  1697.   *ptr++ = ch;
  1698.   *ptr = 0;
  1699.  
  1700.   return buf;
  1701. }
  1702.  
  1703. #ifdef WITH_FUDGE
  1704. #include "yyfudge.c"
  1705. #endif
  1706.